{{! usage: link to="namepath" html=true/false caption="optional caption"~}}

{{~#if html~}}
<inlineCode>
{{~#link to~}}
{{#if url~}}
<a href="{{{url}}}">{{#if ../../caption}}{{../../../caption}}{{else}}{{name}}{{/if}}</a>
{{~else~}}
{{#if ../../caption}}{{../../../caption}}{{else}}{{escape name}}{{/if~}}
{{/if~}}
{{/link~}}

</inlineCode>
{{~else~}}

{{#link to~}}
{{#if url~}}
[`{{#if ../../caption}}{{../../../caption}}{{else}}{{{escape name}}}{{/if}}`]({{{url}}})
{{~else~}}
`{{#if ../../caption}}{{../../../caption}}{{else}}{{{escape name}}}{{/if~}}`
{{~/if~}}
{{/link~}}

{{/if~}}
